package com.cjm.algorithm.array;

public class RemoveElement27 {
    int removeElement(int[] nums, int val) {
        int slowIndex = 0;
        for (int fastIndex = 0; fastIndex < nums.length; fastIndex++) {
            if (val != nums[fastIndex]) {
                // 移除0， 移除某个具体的元素
                nums[slowIndex] = nums[fastIndex];
            }
        }
        return slowIndex;
    }
}
